var t = require("../../../utils/tool");

Component({
    properties: {
        logistics: {
            type: Object,
            observer: function(t) {
                if ("SF" == t.type) {
                    var i = t.no ? t.no.substring(0, t.no.length - 5) : "";
                    this.setData({
                        no: i
                    });
                } else this.setData({
                    no: t.no
                });
            }
        },
        orderDetail: {
            type: Object
        }
    },
    data: {
        imgUrl: "images/order_logistics_icon@2x.png",
        no: ""
    },
    methods: {
        onTap: function() {
            0 != this.data.logistics.list.length ? this.triggerEvent("tapping", {}) : (0, t.toastToPage)(this.data.logistics.msg);
        }
    }
});